(import logic.*)
(deftemplate Qualities (declare (from-class Qualities)))
(deftemplate QualitiesPriorities (declare (from-class QualitiesPriorities)))
(defglobal ?*cont* = 0)


(defrule skill-priority-comunication1
    (Qualities {comunication > 70})
    (QualitiesPriorities {quality1 == "Comunication"})  
    =>
    (add (+ 70 ?*cont*)))

(defrule skill-priority-computation-knowledge1
    (Qualities {computation_knowledge  > 70})
    (QualitiesPriorities {quality1 == "Computation knowledge"})  
    =>
    (add (+ 70 ?*cont*)))

(defrule skill-priority-solving-problems1
    (Qualities {solving_problems  > 70})
    (QualitiesPriorities {quality1 == "Solving problems"})  
    =>
    (add (+ 70 ?*cont*)))

(defrule skill-priority-interpersonal-habilities1
    (Qualities {interpersonal_habilities  > 70})
    (QualitiesPriorities {quality1 == "Interpersonal habilities"})  
    =>
    (add (+ 70 ?*cont*)))

(defrule skill-pririty-group-habilities1
    (Qualities {group_habilities  > 70})
    (QualitiesPriorities {quality1 == "Group habilities"})  
    =>
    (add (+ 70 ?*cont*)))

(defrule skill-priority-diversity1
    (Qualities {diversity  > 70})
    (QualitiesPriorities {quality1 == "Diversity"})  
    =>
    (add (+ 70 ?*cont*)))

(defrule skill-priority-planning1
    (Qualities {planning  > 70})
    (QualitiesPriorities {quality1 == "Planning"})  
    =>
    (add (+ 70 ?*cont*)))

(defrule skill-priority-leadership1
    (Qualities {leadership  > 70})
    (QualitiesPriorities {quality1 == "Leadership"})  
    =>
    (add (+ 70 ?*cont*)))

(defrule skill-priority-flexibility1
    (Qualities {flexibility  > 70})
    (QualitiesPriorities {quality1 == "Flexibility"})  
    =>
    (add (+ 70 ?*cont*)))

(defrule skill-priority-professionalism1
    (Qualities {professionalism  > 70})
    (QualitiesPriorities {quality1 == "Professionalism"})  
    =>
    (add (+ 70 ?*cont*)))

(defrule skill-priority-possitive-actitude1
    (Qualities {possitive_actitude  > 70})
    (QualitiesPriorities {quality1 == "Possitive actitude"})  
    =>
    (add (+ 70 ?*cont*)))


(defrule skill-priority-comunication2
    (Qualities {comunication > 70})
    (QualitiesPriorities {quality2 == "Comunication"})  
    =>
    (add (+ 60 ?*cont*)))

(defrule skill-priority-computation-knowledge2
    (Qualities {computation_knowledge  > 70})
    (QualitiesPriorities {quality2 == "Computation knowledge"})  
    =>
    (add (+ 60 ?*cont*)))

(defrule skill-priority-solving-problems2
    (Qualities {solving_problems  > 70})
    (QualitiesPriorities {quality2 == "Solving problems"})  
    =>
    (add (+ 60 ?*cont*)))

(defrule skill-priority-interpersonal-habilities2
    (Qualities {interpersonal_habilities  > 70})
    (QualitiesPriorities {quality2 == "Interpersonal habilities"})  
    =>
    (add (+ 60 ?*cont*)))

(defrule skill-pririty-group-habilities2
    (Qualities {group_habilities  > 70})
    (QualitiesPriorities {quality2 == "Group habilities"})  
    =>
    (add (+ 60 ?*cont*)))

(defrule skill-priority-diversity2
    (Qualities {diversity  > 70})
    (QualitiesPriorities {quality2 == "Diversity"})  
    =>
    (add (+ 60 ?*cont*)))

(defrule skill-priority-planning2
    (Qualities {planning  > 70})
    (QualitiesPriorities {quality2 == "Planning"})  
    =>
    (add (+ 60 ?*cont*)))

(defrule skill-priority-leadership2
    (Qualities {leadership  > 70})
    (QualitiesPriorities {quality2 == "Leadership"})  
    =>
    (add (+ 60 ?*cont*)))

(defrule skill-priority-flexibility2
    (Qualities {flexibility  > 70})
    (QualitiesPriorities {quality2 == "Flexibility"})  
    =>
    (add (+ 60 ?*cont*)))

(defrule skill-priority-professionalism2
    (Qualities {professionalism  > 70})
    (QualitiesPriorities {quality2 == "Professionalism"})  
    =>
    (add (+ 60 ?*cont*)))

(defrule skill-priority-possitive-actitude2
    (Qualities {possitive_actitude  > 70})
    (QualitiesPriorities {quality2 == "Possitive_actitude"})  
    =>
    (add (+ 60 ?*cont*)))



(defrule skill-priority-comunication3
    (Qualities {comunication > 70})
    (QualitiesPriorities {quality3 == "Comunication"})  
    =>
    (add (+ 50 ?*cont*)))

(defrule skill-priority-computation-knowledge3
    (Qualities {computation_knowledge  > 70})
    (QualitiesPriorities {quality3 == "Computation knowledge"})  
    =>
    (add (+ 50 ?*cont*)))

(defrule skill-priority-solving-problems3
    (Qualities {solving_problems  > 70})
    (QualitiesPriorities {quality3 == "Solving problems"})  
    =>
    (add (+ 50 ?*cont*)))

(defrule skill-priority-interpersonal-habilities3
    (Qualities {interpersonal_habilities  > 70})
    (QualitiesPriorities {quality3 == "Interpersonal habilities"})  
    =>
    (add (+ 50 ?*cont*)))

(defrule skill-pririty-group-habilities3
    (Qualities {group_habilities  > 70})
    (QualitiesPriorities {quality3 == "Group habilities"})  
    =>
    (add (+ 50 ?*cont*)))

(defrule skill-priority-diversity3
    (Qualities {diversity  > 70})
    (QualitiesPriorities {quality3 == "Diversity"})  
    =>
    (add (+ 50 ?*cont*)))

(defrule skill-priority-planning3
    (Qualities {planning  > 70})
    (QualitiesPriorities {quality3 == "Planning"})  
    =>
    (add (+ 50 ?*cont*)))

(defrule skill-priority-leadership3
    (Qualities {leadership  > 70})
    (QualitiesPriorities {quality3 == "Leadership"})  
    =>
    (add (+ 50 ?*cont*)))

(defrule skill-priority-flexibility3
    (Qualities {flexibility  > 70})
    (QualitiesPriorities {quality3 == "Flexibility"})  
    =>
    (add (+ 50 ?*cont*)))

(defrule skill-priority-professionalism3
    (Qualities {professionalism  > 70})
    (QualitiesPriorities {quality3 == "Professionalism"})  
    =>
    (add (+ 50 ?*cont*)))

(defrule skill-priority-possitive-actitude3
    (Qualities {possitive_actitude  > 70})
    (QualitiesPriorities {quality3 == "Possitive actitude"})  
    =>
    (add (+ 50 ?*cont*)))



(defrule skill-comunication
    ?person <- (Qualities {comunication >= 50})
    =>
    (add (+ 25 ?*cont*)))

(defrule skill-computation-knowledge
    ?person <- (Qualities {computation_knowledge >= 50})
    =>
    (add (+ 24 ?*cont*)))
  

(defrule skill-solving-problems
    ?person <- (Qualities {solving_problems >= 50})
    =>
	(add (+ 23 ?*cont*)))

(defrule skill-interpersonal-habilities
    ?person <- (Qualities {interpersonal_habilities >= 50})
    =>
	(add (+ 22 ?*cont*)))

(defrule skill-group-habilities
    ?person <- (Qualities {group_habilities >= 50})
    =>
	(add (+ 21 ?*cont*)))

(defrule skill-diversity
    ?person <- (Qualities {diversity >= 50})
    =>
	(add (+ 20 ?*cont*)))

(defrule skill-planning
    ?person <- (Qualities {planning >= 50})
    =>
	(add (+ 19 ?*cont*)))

(defrule skill-leadership
    ?person <- (Qualities {leadership >= 50})
    =>
	(add (+ 18 ?*cont*)))

(defrule skill-flexibility
    ?person <- (Qualities {flexibility >= 50})
    =>
	(add (+ 17 ?*cont*)))

(defrule skill-professionalism
    ?person <- (Qualities {professionalism >= 50})
    =>
	(add (+ 16 ?*cont*)))

(defrule skill-possitive-actitude
    ?person <- (Qualities {possitive_actitude >= 50})
    =>
	(add (+ 15 ?*cont*)))


(agenda)